var app = getApp();
var util = require("../../utils/libs.js")
var api = require("../../utils/api.js")
var data = require("../../utils/date.js")
Page({
  data: {
     skillList:[],
     page:0,
     limit:10,
     uid:""
  },
  onLoad (options) {
    let that = this
    let uid = wx.getStorageSync('uid')
    that.setData({
        uid:uid
    })
    // 页面初始化 options为页面跳转所带来的参数
    that.getList()
  },
  getList(){
    let that = this
    util.request(api.inviteList,
      {uid:that.data.uid},"GET")
    .then(function (res) {
      if(res.error_code === 0){
        console.log(res)
         that.setData({
          skillList:res.data.list
         })
      }
    })
  },
  goDetail(e){
    let id = e.currentTarget.dataset.id
    wx.navigateTo({
      url:"/pages/assist/assist?id="+id
    })
  },
  onReady () {
    // 页面渲染完成
  },
  onShow () {
    // 页面显示
  },
  onHide () {
    // 页面隐藏

  },
  onUnload () {
    // 页面关闭

  }
})
